$(function(){
	$(".right-panel .gotop").click(function(){
		$("body").animate({"scrollTop": "0px"},1000);
	})

	
	$(".banner_ad a").hover(function(){
		$(this).css('right','15px')
	},function(){
		$(this).css('right','0px')
	})

	var li_width = Math.ceil($("#nav .nav_list>li").eq(0).outerWidth());
	var li_left = Math.ceil($("#nav .nav_list>li").eq(0).position().left);
	$("#nav .nav_list>li").mouseover(function(){
		var li_width = Math.ceil($(this).outerWidth());
		var li_left = Math.ceil($(this).position().left);
		$('#nav .nav_active').stop().animate({width:li_width,left:li_left},{duration:1500,easing:"easeOutElastic"})
		})
	$("#nav .nav_list>li").mouseout(function(){
		$('#nav .nav_active').stop().animate({width:li_width,left:li_left},{duration:1500,easing:"easeOutElastic"})	
		})

	$(window).resize(function() {
	  	$(".right-panel").css("height",document.documentElement.clientHeight)
	});

})